package com.interauto.Dao.Mapper;

import com.interauto.Dao.entity.Caseinfo;
import org.apache.ibatis.annotations.*;

@Mapper
public interface MgCaseInfoInter {
    @Insert("insert into caseinfo(casename, caseinfo, projectid, updatetime, createtime, delstatus) value" +
            " (#{caseinfo.casename},#{caseinfo.caseinfo},#{caseinfo.projectid},now(),now(),0)")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    int addcaseinfo(@Param(value = "caseinfo") Caseinfo caseinfo);

    @Update("update caseinfo set casename=#{caseinfo.casename},caseinfo=#{caseinfo.caseinfo} where id=#{caseinfo.id}")
    void udcaseinfo(@Param(value = "caseinfo") Caseinfo caseinfo);

    @Update("update caseinfo set delstatus=1 where id=#{caseid}")
    void delcaseinfo(@Param(value = "caseid") int caseid);


}
